package edu.sctu.practice.class02.shuqiqi.assign.assign05;

/**
 * Created by admin on 2015/12/17.
 */
public class Class1 {

    //第二
    //    public static void main (String args[]){
//        sub_Sort3 m1 = new sub_Sort3();
//        m1.subsort(100,200,300);
//        System.out.println("三个数从大到小为："+m1.max1+","+m1.max2+","+m1.max3);
//    }
   //第三
    public static void main (String args[]){
        Sort2or3 m1 = new Sort2or3();
        m1.sort(100,200);
        System.out.println("两个数从大到小为："+m1.max1+","+m1.max2);
        m1.sort(50,150,100);
        System.out.println("三个数从大到小为："+m1.max1+","+m1.max2+","+m1.max3);
    }


    //第四
//    public static void main(String args[]) {
//        int a[] = {34, 12, 8, 67, 88, 23, 98, 101, 119, 56};
//        sort_Demo m1 = new sort_Demo();
//        S_Demo m2 = new S_Demo();
//        System.out.println("排序前的数据为：");
//        for (int i = 0; i < 10; i++)
//            System.out.print("  " + a[i]);
//        //调用父类中的sotr()方法
//        m1.sort(a.length, a);
//        System.out.println("\n按升序排列的数据为：");
//        for (int i = 0; i < 10; i++)
//            System.out.print("  " + a[i]);
//        //调用子类中的sort()方法,该方法实现了对父类中方法的覆盖
//        m2.sort(a.length, a);
//        System.out.println("\n按降序排列的数据为：");
//        for (int i = 0; i < 10; i++)
//            System.out.print("  " + a[i]);
//    }
}


